var t = getApp();

Component({
    properties: {
        datas: {
            type: null
        },
        storeList: {
            type: null
        },
        showMun: {
            type: null
        },
        plugin_active: String
    },
    data: {
        emptyImage: "https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/image.png",
        clientWidth: "375"
    },
    lifetimes: {
        attached: function() {},
        moved: function() {},
        detached: function() {}
    },
    attached: function() {},
    ready: function() {
        this.setData({
            clientWidth: wx.getSystemInfoSync().windowWidth
        });
    },
    observers: {
        "storeList,datas": function(t, e) {}
    },
    pageLifetimes: {
        show: function() {},
        hide: function() {},
        resize: function() {}
    },
    methods: {
        toRouter: function(t) {
            var e = t.currentTarget.dataset.item;
            1 == e.specify_show ? wx.navigateTo({
                url: "/packageC/o2o/o2oStore/o2oStore?store_id=" + e.id + "&fromHome=1"
            }) : 1 == e.store_decorate ? wx.navigateTo({
                url: "/packageG/o2o/HomeSeller/HomeSeller?store_id=" + e.id
            }) : wx.navigateTo({
                url: "/packageC/o2o/HomeSeller/HomeSeller?store_id=" + e.id
            });
        },
        toPunch: function(e) {
            var a = e.currentTarget.dataset.id, o = t.getNetAddresss("plugin.store-attendance.frontend.member.attendance");
            t._getNetWork({
                url: o,
                data: {
                    store_id: a
                },
                success: function(t) {
                    var e = t.data;
                    e.result, wx.showToast({
                        title: e.msg,
                        duration: 1e3,
                        icon: "none"
                    });
                },
                fail: function(t) {}
            });
        },
        toClassify: function(t) {
            var e = t.currentTarget.dataset.id, a = t.currentTarget.dataset.name;
            wx.navigateTo({
                url: "/packageC/o2o/o2oCategory/o2oCategory?id=" + e + "&city=" + this.data.city + "&point=" + JSON.stringify(this.data.point) + "&name=" + a
            });
        },
        toGoods: function(t) {
            var e = t.currentTarget.dataset.item;
            wx.navigateTo({
                url: "/packageA/detail_v2/detail_v2?id=" + e.goods_id
            });
        },
        goToAdress: function(e) {
            var a = e.currentTarget.dataset.items.latitude, o = e.currentTarget.dataset.items.longitude, n = e.currentTarget.dataset.items.store_name, i = t.BMapTransqqMap(parseFloat(o), parseFloat(a));
            wx.openLocation({
                latitude: i.lat,
                longitude: i.lng,
                scale: 18,
                name: n
            });
        }
    }
});